package com.zhuangjie.shop.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *  店铺活动
 * </p>
 *
 * @author zhuangjie
 * @since 2024-03-12
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("shop_activity")
@ApiModel(value = "ShopActivity对象", description = "")
public class ShopActivity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 这个值，应是可自定义的，不能由系统生成
     * 它是id同时也是type，前端页面需要根据这个值来判断
     * （1:满减活动,2:新客立减 3减配送费 4神会员膨胀券-参与标志 ）
     */
    @ApiModelProperty("活动id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("活动名称")
    @TableField("`name`")
    private String name;

    @ApiModelProperty("描述信息")
    @TableField("`describe`")
    private String describe;

    @ApiModelProperty("作用flags(多个用逗号隔开)")
    @TableField("flags")
    private String flags;

    @ApiModelProperty("活动icon")
    @TableField("striking_icon")
    private String strikingIcon;

    @ApiModelProperty("活动特征字符")
    @TableField("striking_char")
    private String strikingChar;

    @ApiModelProperty("活动特征颜色")
    @TableField("striking_color")
    private String strikingColor;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    @ApiModelProperty(value = "逻辑删除")
    @TableField(value = "deleted",fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleted;
}
